***File used to compute results and generate tables for Murphy "Sobriety, Social Capital, and Village Network Structures"

clear all


cd "User file location"
use "dyadicdatasetforestimation", clear


*CUSTOM DO FILES

///User must manually install frmttable package. Use search command in Stata to find package then select "install".

/*
ssc install tuples
ssc install ftools
ssc install reghdfe
ssc install wyoung
*/



drop if indvid==indvidmch //drop i=i dyads.

global villagenumber villagenum2 villagenum3 villagenum4 villagenum5 villagenum6 villagenum7 villagenum8 villagenum9 villagenum10 villagenum11 villagenum12 villagenum13 villagenum14 villagenum15 villagenum16 villagenum17 villagenum18 villagenum19 villagenum20 villagenum21 villagenum22 villagenum23 villagenum24 villagenum25 villagenum26 villagenum27 villagenum28 villagenum29 villagenum30
global regressors iteso luhya tlu mathproblem readenglish readswahili multiplespouses hhsize blage yrseduc assetindx nightsaway blalcoholnumber distvillagemediankm landareaacres farmer
global regressorsmatch itesomch luhyamch tlumch mathproblemmch readenglishmch readswahilimch multiplespousesmch hhsizemch blagemch yrseducmch assetindxmch nightsawaymch blalcoholnumbermch distvillagemediankmmch landareaacresmch farmermch

global sumvars1
global diffvars1
local num1 : word count $regressors
global outcomevars advice trust workedwith helpdecreasingalc speakdaily drankwith closefriend infopublichealth

forvalues x=1/`num1'{
local z : word `x' of $regressors
local y : word `x' of $regressorsmatch
gen `z'sum=`z'+`y'
gen `z'diff=`z'-`y'
global sumvars1 $sumvars1 `z'sum
global diffvars1 $diffvars1 `z'diff 
}

label var advice "Received any kind of agricultural advice from $ j $$\ddagger$"


//////network summary statistics
global netsumstats knowperson family familyext knownatleast10yrs closefriend speakdaily infopublichealth advice drankwith helpdecreasingalc workedwith trust
mat mean_sd=J(12,2,.)
local i=1
foreach var in $netsumstats{
sum `var'
 mat mean_sd[`i',1] = r(mean)
local i=`i'+1
} 
local i=1
foreach var in $netsumstats{
sum `var' if knowperson==1
 mat mean_sd[`i',2] = r(mean)
local i=`i'+1
} 



mat rownames mean_sd = knowperson family familyext knownatleast10yrs closefriend speakdaily infopublichealth advice drankwith helpdecreasingalc workedwith trust
frmttable using "networksummarystats", statmat(mean_sd) varlabels ctitles(Dyadic Variable , Full sample, Conditional on knowing $ j $) addrows(N, "7,331", "5,999") hlines(11{0}11) tex frag replace

label var advice "Received any kind of agricultural advice from $ j $"

////Main Results and Mechanisms/////

eststo knowperson1: reghdfe knowperson treattreat treatcontrol controltreat stddist $sumvars1 $diffvars1 , absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)
estadd local nearby "No"
estadd local fes "Yes"
estadd local regressors "Yes"
sum knowperson if controlcontrol==1
scalar mean= round(r(mean), .01)
estadd scalar ccmean=mean

eststo knowperson2: reghdfe knowperson treattreat treatcontrol controltreat stddist $sumvars1 $diffvars1 if distance50bi==1, absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)
estadd local nearby "Yes"
estadd local fes "Yes"
estadd local regressors "Yes"
sum knowperson if controlcontrol==1&distance50bi==1
scalar mean= round(r(mean), .01)
estadd scalar ccmean=mean

eststo knowperson3: reghdfe knowperson treattreat treatcontrol controltreat stddist $sumvars1 $diffvars1 if malemale==1, absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)
estadd local nearby "No"
estadd local fes "Yes"
estadd local regressors "Yes"
sum knowperson if controlcontrol==1&malemale==1
scalar mean= round(r(mean), .01)
estadd scalar ccmean=mean

eststo knowperson4: reghdfe knowperson treattreat treatcontrol controltreat stddist $sumvars1 $diffvars1 if distance50bi==1&malemale==1, absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)
estadd local nearby "Yes"
estadd local fes "Yes"
estadd local regressors "Yes"
sum knowperson if controlcontrol==1&distance50bi==1&malemale==1
scalar mean= round(r(mean), .01)
estadd scalar ccmean=mean

eststo knowperson5: reghdfe knowperson treattreat treatcontrol controltreat stddist $sumvars1 $diffvars1 if femalefemale==1, absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)
estadd local nearby "No"
estadd local fes "Yes"
estadd local regressors "Yes"
sum knowperson if controlcontrol==1&femalefemale==1
scalar mean= round(r(mean), .01)
estadd scalar ccmean=mean

eststo knowperson6: reghdfe knowperson treattreat treatcontrol controltreat stddist $sumvars1 $diffvars1 if distance50bi==1&femalefemale==1, absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)
estadd local nearby "Yes"
estadd local fes "Yes"
estadd local regressors "Yes"
sum knowperson if controlcontrol==1&distance50bi==1&femalefemale==1
scalar mean= round(r(mean), .01)
estadd scalar ccmean=mean

eststo knowperson7: reghdfe knowperson treattreat treatcontrol controltreat stddist $sumvars1 $diffvars1 if mixedgender==1, absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)
estadd local nearby "No"
estadd local fes "Yes"
estadd local regressors "Yes"
sum knowperson if controlcontrol==1&mixedgender==1
scalar mean= round(r(mean), .01)
estadd scalar ccmean=mean

eststo knowperson8: reghdfe knowperson treattreat treatcontrol controltreat stddist $sumvars1 $diffvars1 if distance50bi==1&mixedgender==1, absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)
estadd local nearby "Yes"
estadd local fes "Yes"
estadd local regressors "Yes"
sum knowperson if controlcontrol==1&distance50bi==1&mixedgender==1
scalar mean= round(r(mean), .01)
estadd scalar ccmean=mean

eststo knowperson9: reghdfe knowperson treattreat treatcontrol controltreat stddist $sumvars1 $diffvars1 if samegender==1, absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)
estadd local nearby "No"
estadd local fes "Yes"
estadd local regressors "Yes"
sum knowperson if controlcontrol==1&samegender==1
scalar mean= round(r(mean), .01)
estadd scalar ccmean=mean

eststo knowperson10: reghdfe knowperson treattreat treatcontrol controltreat stddist $sumvars1 $diffvars1 if distance50bi==1&samegender==1, absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)
estadd local nearby "Yes"
estadd local fes "Yes"
estadd local regressors "Yes"
sum knowperson if controlcontrol==1&distance50bi==1&samegender==1
scalar mean= round(r(mean), .01)
estadd scalar ccmean=mean

esttab knowperson1 knowperson2 knowperson3 knowperson4 knowperson5 knowperson6 knowperson7 knowperson8 knowperson9 knowperson10 using "netknowperson.tex", label replace obslast star(* 0.10 ** 0.05 *** 0.01) se nomtitles mgroups("Full Sample" "Male-Male" "Female-Female" "Mixed Gender" "Same Gender", pattern(1 0 1 0 1 0 1 0 1 0) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span})) substitute(\_ _) ///
scalars("nearby Nearby subsample$ \dagger $" "ccmean Control-Control mean" "fes Village/Enumerator FEs" "regressors Additional regressors$ \ddagger $") b(2) sfmt(2) nonotes nogaps noomitted order(treattreat treatcontrol controltreat stddist) drop($sumvars1 $diffvars1)


foreach var of varlist $outcomevars{

eststo `var'1: reghdfe `var' treattreat treatcontrol controltreat stddist familyext knownatleast10yrs spouse $sumvars1 $diffvars1 , absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)
estadd local nearby "No"
estadd local fes "Yes"
estadd local regressors "Yes"
sum `var' if controlcontrol==1
scalar mean= round(r(mean), .01)
estadd scalar ccmean=mean

eststo `var'2: reghdfe `var' treattreat treatcontrol controltreat stddist familyext knownatleast10yrs spouse $sumvars1 $diffvars1 if distance50bi==1, absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)
estadd local nearby "Yes"
estadd local fes "Yes"
estadd local regressors "Yes"
sum `var' if controlcontrol==1&distance50bi==1
scalar mean= round(r(mean), .01)
estadd scalar ccmean=mean


eststo `var'3: reghdfe `var' treattreat treatcontrol controltreat stddist familyext knownatleast10yrs $sumvars1 $diffvars1 if malemale==1, absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)
estadd local nearby "No"
estadd local fes "Yes"
estadd local regressors "Yes"
sum `var' if controlcontrol==1&malemale==1
scalar mean= round(r(mean), .01)
estadd scalar ccmean=mean

eststo `var'4: reghdfe `var' treattreat treatcontrol controltreat stddist familyext knownatleast10yrs $sumvars1 $diffvars1 if distance50bi==1&malemale==1, absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)
estadd local nearby "Yes"
estadd local fes "Yes"
estadd local regressors "Yes"
sum `var' if controlcontrol==1&distance50bi==1&malemale==1
scalar mean= round(r(mean), .01)
estadd scalar ccmean=mean

eststo `var'5: reghdfe `var' treattreat treatcontrol controltreat stddist familyext knownatleast10yrs $sumvars1 $diffvars1 if femalefemale==1, absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)
estadd local nearby "No"
estadd local fes "Yes"
estadd local regressors "Yes"
sum `var' if controlcontrol==1&femalefemale==1
scalar mean= round(r(mean), .01)
estadd scalar ccmean=mean

eststo `var'6: reghdfe `var' treattreat treatcontrol controltreat stddist familyext knownatleast10yrs $sumvars1 $diffvars1 if distance50bi==1&femalefemale==1, absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)
estadd local nearby "Yes"
estadd local fes "Yes"
estadd local regressors "Yes"
sum `var' if controlcontrol==1&distance50bi==1&femalefemale==1
scalar mean= round(r(mean), .01)
estadd scalar ccmean=mean

eststo `var'7: reghdfe `var' treattreat treatcontrol controltreat stddist spouse familyext knownatleast10yrs $sumvars1 $diffvars1 if mixedgender==1, absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)
estadd local nearby "No"
estadd local fes "Yes"
estadd local regressors "Yes"
sum `var' if controlcontrol==1&mixedgender==1
scalar mean= round(r(mean), .01)
estadd scalar ccmean=mean

eststo `var'8: reghdfe `var' treattreat treatcontrol controltreat stddist spouse familyext knownatleast10yrs $sumvars1 $diffvars1 if distance50bi==1&mixedgender==1, absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)
estadd local nearby "Yes"
estadd local fes "Yes"
estadd local regressors "Yes"
sum `var' if controlcontrol==1&distance50bi==1&mixedgender==1
scalar mean= round(r(mean), .01)
estadd scalar ccmean=mean

eststo `var'9: reghdfe `var' treattreat treatcontrol controltreat stddist familyext knownatleast10yrs $sumvars1 $diffvars1 if samegender==1, absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)
estadd local nearby "No"
estadd local fes "Yes"
estadd local regressors "Yes"
sum `var' if controlcontrol==1&samegender==1
scalar mean= round(r(mean), .01)
estadd scalar ccmean=mean

eststo `var'10: reghdfe `var' treattreat treatcontrol controltreat stddist familyext knownatleast10yrs $sumvars1 $diffvars1 if distance50bi==1&samegender==1, absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)
estadd local nearby "Yes"
estadd local fes "Yes"
estadd local regressors "Yes"
sum `var' if controlcontrol==1&distance50bi==1&samegender==1
scalar mean= round(r(mean), .01)
estadd scalar ccmean=mean

esttab `var'1 `var'2 `var'3 `var'4 `var'5 `var'6 `var'7 `var'8 `var'9 `var'10 using "net`var'.tex", label replace obslast star(* 0.10 ** 0.05 *** 0.01) se nomtitles mgroups("Full Sample" "Male-Male" "Female-Female" "Mixed Gender" "Same Gender", pattern(1 0 1 0 1 0 1 0 1 0) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span})) substitute(\_ _) ///
scalars("nearby Nearby subsample$ \dagger $" "ccmean Control-Control mean" "fes Village/Enumerator FEs" "regressors Additional regressors$ \ddagger $")  b(2) sfmt(2) nonotes nogaps noomitted order(treattreat treatcontrol controltreat stddist) drop($sumvars1 $diffvars1)


}



////Unconditional results (appendix)/////


eststo knowperson1: reghdfe knowperson treattreat treatcontrol controltreat , noabsorb cluster(indvid indvidmch)
estadd local nearby "No"
estadd local fes "No"
estadd local regressors "No"
sum knowperson if controlcontrol==1
scalar mean= round(r(mean), .01)
estadd scalar ccmean=mean

eststo knowperson2: reghdfe knowperson treattreat treatcontrol controltreat if distance50bi==1, noabsorb cluster(indvid indvidmch)
estadd local nearby "Yes"
estadd local fes "No"
estadd local regressors "No"
sum knowperson if controlcontrol==1&distance50bi==1
scalar mean= round(r(mean), .01)
estadd scalar ccmean=mean

eststo knowperson3: reghdfe knowperson treattreat treatcontrol controltreat if malemale==1, noabsorb cluster(indvid indvidmch)
estadd local nearby "No"
estadd local fes "No"
estadd local regressors "No"
sum `var' if controlcontrol==1&malemale==1
scalar mean= round(r(mean), .01)
estadd scalar ccmean=mean

eststo knowperson4: reghdfe knowperson treattreat treatcontrol controltreat if distance50bi==1&malemale==1, noabsorb cluster(indvid indvidmch)
estadd local nearby "Yes"
estadd local fes "No"
estadd local regressors "No"
sum knowperson if controlcontrol==1&malemale==1
scalar mean= round(r(mean), .01)
estadd scalar ccmean=mean

eststo knowperson5: reghdfe knowperson treattreat treatcontrol controltreat  if femalefemale==1, noabsorb cluster(indvid indvidmch)
estadd local nearby "No"
estadd local fes "No"
estadd local regressors "No"
sum knowperson if controlcontrol==1&femalefemale==1
scalar mean= round(r(mean), .01)
estadd scalar ccmean=mean

eststo knowperson6: reghdfe knowperson treattreat treatcontrol controltreat  if distance50bi==1&femalefemale==1, noabsorb cluster(indvid indvidmch)
estadd local nearby "No"
estadd local fes "No"
estadd local regressors "No"
sum knowperson if controlcontrol==1&distance50bi==1&femalefemale==1
scalar mean= round(r(mean), .01)
estadd scalar ccmean=mean

eststo knowperson7: reghdfe knowperson treattreat treatcontrol controltreat  if mixedgender==1, noabsorb cluster(indvid indvidmch)
estadd local nearby "No"
estadd local fes "No"
estadd local regressors "No"
sum knowperson if controlcontrol==1&mixedgender==1
scalar mean= round(r(mean), .01)
estadd scalar ccmean=mean

eststo knowperson8: reghdfe knowperson treattreat treatcontrol controltreat  if distance50bi==1&mixedgender==1, noabsorb cluster(indvid indvidmch)
estadd local nearby "Yes"
estadd local fes "No"
estadd local regressors "No"
sum knowperson if controlcontrol==1&distance50bi==1&mixedgender==1
scalar mean= round(r(mean), .01)
estadd scalar ccmean=mean

eststo knowperson9: reghdfe knowperson treattreat treatcontrol controltreat  if samegender==1, noabsorb cluster(indvid indvidmch)
estadd local nearby "No"
estadd local fes "No"
estadd local regressors "No"
sum knowperson if controlcontrol==1&samegender==1
scalar mean= round(r(mean), .01)
estadd scalar ccmean=mean

eststo knowperson10: reghdfe knowperson treattreat treatcontrol controltreat if distance50bi==1&samegender==1, noabsorb cluster(indvid indvidmch)
estadd local nearby "Yes"
estadd local fes "No"
estadd local regressors "No"
sum knowperson if controlcontrol==1&distance50bi==1&samegender==1
scalar mean= round(r(mean), .01)
estadd scalar ccmean=mean

esttab knowperson1 knowperson2 knowperson3 knowperson4 knowperson5 knowperson6 knowperson7 knowperson8 knowperson9 knowperson10 using "netknowpersonuncond.tex", label replace obslast star(* 0.10 ** 0.05 *** 0.01) se nomtitles mgroups("Full Sample" "Male-Male" "Female-Female" "Mixed Gender" "Same Gender", pattern(1 0 1 0 1 0 1 0 1 0) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span})) substitute(\_ _) ///
scalars("nearby Nearby subsample$ \dagger $" "ccmean Control-Control mean" "fes Village/Enumerator FEs" "regressors Additional regressors$ \ddagger $") b(2) sfmt(2) nonotes nogaps noomitted order(treattreat treatcontrol controltreat) 

foreach var of varlist $outcomevars{

eststo `var'1: reghdfe `var' treattreat treatcontrol controltreat spouse , noabsorb cluster(indvid indvidmch)
estadd local nearby "No"
estadd local fes "No"
estadd local regressors "No"
sum `var' if controlcontrol==1
scalar mean= round(r(mean), .01)
estadd scalar ccmean=mean

eststo `var'2: reghdfe `var' treattreat treatcontrol controltreat spouse if distance50bi==1, noabsorb cluster(indvid indvidmch)
estadd local nearby "Yes"
estadd local fes "No"
estadd local regressors "No"
sum `var' if controlcontrol==1&distance50bi==1
scalar mean= round(r(mean), .01)
estadd scalar ccmean=mean

eststo `var'3: reghdfe `var' treattreat treatcontrol controltreat if malemale==1, noabsorb cluster(indvid indvidmch)
estadd local nearby "No"
estadd local fes "No"
estadd local regressors "No"
sum `var' if controlcontrol==1&malemale==1
scalar mean= round(r(mean), .01)
estadd scalar ccmean=mean

eststo `var'4: reghdfe `var' treattreat treatcontrol controltreat if distance50bi==1&malemale==1, noabsorb cluster(indvid indvidmch)
estadd local nearby "Yes"
estadd local fes "No"
estadd local regressors "No"
sum `var' if controlcontrol==1&distance50bi==1&malemale==1
scalar mean= round(r(mean), .01)
estadd scalar ccmean=mean

eststo `var'5: reghdfe `var' treattreat treatcontrol controltreat if femalefemale==1, noabsorb cluster(indvid indvidmch)
estadd local nearby "No"
estadd local fes "No"
estadd local regressors "No"
sum `var' if controlcontrol==1&femalefemale==1
scalar mean= round(r(mean), .01)
estadd scalar ccmean=mean

eststo `var'6: reghdfe `var' treattreat treatcontrol controltreat if distance50bi==1&femalefemale==1, noabsorb cluster(indvid indvidmch)
estadd local nearby "Yes"
estadd local fes "No"
estadd local regressors "No"
sum `var' if controlcontrol==1&distance50bi==1&femalefemale==1
scalar mean= round(r(mean), .01)
estadd scalar ccmean=mean

eststo `var'7: reghdfe `var' treattreat treatcontrol controltreat spouse if mixedgender==1, noabsorb cluster(indvid indvidmch)
estadd local nearby "No"
estadd local fes "No"
estadd local regressors "No"
sum `var' if controlcontrol==1&mixedgender==1
scalar mean= round(r(mean), .01)
estadd scalar ccmean=mean

eststo `var'8: reghdfe `var' treattreat treatcontrol controltreat spouse if distance50bi==1&mixedgender==1, noabsorb cluster(indvid indvidmch)
estadd local nearby "Yes"
estadd local fes "No"
estadd local regressors "No"
sum `var' if controlcontrol==1&distance50bi==1&mixedgender==1
scalar mean= round(r(mean), .01)
estadd scalar ccmean=mean

eststo `var'9: reghdfe `var' treattreat treatcontrol controltreat if samegender==1, noabsorb cluster(indvid indvidmch)
estadd local nearby "No"
estadd local fes "No"
estadd local regressors "No"
sum `var' if controlcontrol==1&samegender==1
scalar mean= round(r(mean), .01)
estadd scalar ccmean=mean

eststo `var'10: reghdfe `var' treattreat treatcontrol controltreat if distance50bi==1&samegender==1, noabsorb cluster(indvid indvidmch)
estadd local nearby "Yes"
estadd local fes "No"
estadd local regressors "No"
sum `var' if controlcontrol==1&distance50bi==1&samegender==1
scalar mean= round(r(mean), .01)
estadd scalar ccmean=mean

esttab `var'1 `var'2 `var'3 `var'4 `var'5 `var'6 `var'7 `var'8 `var'9 `var'10 using "net`var'uncond.tex", label replace obslast star(* 0.10 ** 0.05 *** 0.01) se nomtitles mgroups("Full Sample" "Male-Male" "Female-Female" "Mixed Gender" "Same Gender", pattern(1 0 1 0 1 0 1 0 1 0) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span})) substitute(\_ _) ///
scalars("nearby Nearby subsample$ \dagger $" "ccmean Control-Control mean" "fes Village/Enumerator FEs" "regressors Additional regressors$ \ddagger $")  b(2) sfmt(2) nonotes nogaps noomitted order(treattreat treatcontrol controltreat) 

}



///Multiple Hypothesis Testing

*Note: the code from this point takes approximately 3.5 hours to run on computer with specs: Intel Core i7 2.6 GHz, 32GB RAM


wyoung, cmd("reghdfe knowperson treattreat treatcontrol controltreat stddist $sumvars1 $diffvars1 , absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)" "reghdfe helpdecreasingalc treattreat treatcontrol controltreat stddist familyext knownatleast10yrs spouse $sumvars1 $diffvars1 , absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)" "reghdfe advice treattreat treatcontrol controltreat stddist familyext knownatleast10yrs spouse $sumvars1 $diffvars1 , absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)" "reghdfe trust treattreat treatcontrol controltreat stddist familyext knownatleast10yrs spouse $sumvars1 $diffvars1 , absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)" "reghdfe workedwith treattreat treatcontrol controltreat stddist familyext knownatleast10yrs spouse $sumvars1 $diffvars1 , absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)" "reghdfe speakdaily treattreat treatcontrol controltreat stddist familyext knownatleast10yrs spouse $sumvars1 $diffvars1 , absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)" "reghdfe infopublichealth treattreat treatcontrol controltreat stddist familyext knownatleast10yrs spouse $sumvars1 $diffvars1 , absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)" "reghdfe closefriend treattreat treatcontrol controltreat stddist familyext knownatleast10yrs spouse $sumvars1 $diffvars1 , absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)" "reghdfe drankwith treattreat treatcontrol controltreat stddist familyext knownatleast10yrs spouse $sumvars1 $diffvars1 , absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)") familyp(treattreat) cluster(indvid) bootstraps(100) seed(111)

matrix A=r(table)
matrix A1=A[1...,1..4]
matrix rownames A1="Know $ j $" "Help decreasing alcohol $ j $" "Agricultural info from $ j $" "Trust $ j $" "Worked with $ j $" "Speak daily with $ j $" "Public health info from $ j $" "Close friend with $ j $" "Drank with $ j $"
frmttable using "netmulthypothfull", statmat(A1)  sdec(3,3,3,3) ctitles("Outcome Variable", "Coefficient", "Std. Error", "P-value", "Westfall-Young")  hline(11000000001) tex frag replace

wyoung, cmd("reghdfe knowperson treattreat treatcontrol controltreat stddist $sumvars1 $diffvars1 if distance50bi==1, absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)" "reghdfe helpdecreasingalc treattreat treatcontrol controltreat stddist familyext knownatleast10yrs spouse $sumvars1 $diffvars1 if distance50bi==1, absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)" "reghdfe advice treattreat treatcontrol controltreat stddist familyext knownatleast10yrs spouse $sumvars1 $diffvars1 if distance50bi==1, absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)" "reghdfe trust treattreat treatcontrol controltreat stddist familyext knownatleast10yrs spouse $sumvars1 $diffvars1 if distance50bi==1, absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)" "reghdfe workedwith treattreat treatcontrol controltreat stddist familyext knownatleast10yrs spouse $sumvars1 $diffvars1 if distance50bi==1, absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)" "reghdfe speakdaily treattreat treatcontrol controltreat stddist familyext knownatleast10yrs spouse $sumvars1 $diffvars1 if distance50bi==1, absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)" "reghdfe infopublichealth treattreat treatcontrol controltreat stddist familyext knownatleast10yrs spouse $sumvars1 $diffvars1 if distance50bi==1, absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)" "reghdfe closefriend treattreat treatcontrol controltreat stddist familyext knownatleast10yrs spouse $sumvars1 $diffvars1 if distance50bi==1, absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)" "reghdfe drankwith treattreat treatcontrol controltreat stddist familyext knownatleast10yrs spouse $sumvars1 $diffvars1 if distance50bi==1, absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)") familyp(treattreat) cluster(indvid) bootstraps(100) seed(111)

matrix B=r(table)
matrix B1=B[1...,1..4]
matrix rownames B1="Know $ j $" "Help decreasing alcohol $ j $" "Agricultural info from $ j $" "Trust $ j $" "Worked with $ j $" "Speak daily with $ j $" "Public health info from $ j $" "Close friend with $ j $" "Drank with $ j $"
frmttable using "netmulthypothfull50", statmat(B1)  sdec(3,3,3,3) ctitles("Outcome Variable", "Coefficient", "Std. Error", "P-value", "Westfall-Young")  hline(11000000001) tex frag replace

wyoung, cmd("reghdfe knowperson treattreat treatcontrol controltreat stddist $sumvars1 $diffvars1 if malemale==1, absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)" "reghdfe helpdecreasingalc treattreat treatcontrol controltreat stddist familyext knownatleast10yrs spouse $sumvars1 $diffvars1 if malemale==1, absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)" "reghdfe advice treattreat treatcontrol controltreat stddist familyext knownatleast10yrs spouse $sumvars1 $diffvars1 if malemale==1, absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)" "reghdfe trust treattreat treatcontrol controltreat stddist familyext knownatleast10yrs spouse $sumvars1 $diffvars1 if malemale==1, absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)" "reghdfe workedwith treattreat treatcontrol controltreat stddist familyext knownatleast10yrs spouse $sumvars1 $diffvars1 if malemale==1, absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)" "reghdfe speakdaily treattreat treatcontrol controltreat stddist familyext knownatleast10yrs spouse $sumvars1 $diffvars1 if malemale==1, absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)" "reghdfe infopublichealth treattreat treatcontrol controltreat stddist familyext knownatleast10yrs spouse $sumvars1 $diffvars1 if malemale==1, absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)" "reghdfe closefriend treattreat treatcontrol controltreat stddist familyext knownatleast10yrs spouse $sumvars1 $diffvars1 if malemale==1, absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)" "reghdfe drankwith treattreat treatcontrol controltreat stddist familyext knownatleast10yrs spouse $sumvars1 $diffvars1 if malemale==1, absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)") familyp(treattreat) cluster(indvid) bootstraps(100) seed(111)

matrix C=r(table)
matrix C1=C[1...,1..4]
matrix rownames C1="Know $ j $" "Help decreasing alcohol $ j $" "Agricultural info from $ j $" "Trust $ j $" "Worked with $ j $" "Speak daily with $ j $" "Public health info from $ j $" "Close friend with $ j $" "Drank with $ j $"
frmttable using "netmulthypothfullmm", statmat(C1)  sdec(3,3,3,3) ctitles("Outcome Variable", "Coefficient", "Std. Error", "P-value", "Westfall-Young")  hline(11000000001) tex frag replace

wyoung, cmd("reghdfe knowperson treattreat treatcontrol controltreat stddist $sumvars1 $diffvars1 if malemale==1&distance50bi==1, absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)" "reghdfe helpdecreasingalc treattreat treatcontrol controltreat stddist familyext knownatleast10yrs spouse $sumvars1 $diffvars1 if malemale==1&distance50bi==1, absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)" "reghdfe advice treattreat treatcontrol controltreat stddist familyext knownatleast10yrs spouse $sumvars1 $diffvars1 if malemale==1&distance50bi==1, absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)" "reghdfe trust treattreat treatcontrol controltreat stddist familyext knownatleast10yrs spouse $sumvars1 $diffvars1 if malemale==1&distance50bi==1, absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)" "reghdfe workedwith treattreat treatcontrol controltreat stddist familyext knownatleast10yrs spouse $sumvars1 $diffvars1 if malemale==1&distance50bi==1, absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)" "reghdfe speakdaily treattreat treatcontrol controltreat stddist familyext knownatleast10yrs spouse $sumvars1 $diffvars1 if malemale==1&distance50bi==1, absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)" "reghdfe infopublichealth treattreat treatcontrol controltreat stddist familyext knownatleast10yrs spouse $sumvars1 $diffvars1 if malemale==1&distance50bi==1, absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)" "reghdfe closefriend treattreat treatcontrol controltreat stddist familyext knownatleast10yrs spouse $sumvars1 $diffvars1 if malemale==1&distance50bi==1, absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)" "reghdfe drankwith treattreat treatcontrol controltreat stddist familyext knownatleast10yrs spouse $sumvars1 $diffvars1 if malemale==1&distance50bi==1, absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)") familyp(treattreat) cluster(indvid) bootstraps(100) seed(111)

matrix D=r(table)
matrix D1=D[1...,1..4]
matrix rownames D1="Know $ j $" "Help decreasing alcohol $ j $" "Agricultural info from $ j $" "Trust $ j $" "Worked with $ j $" "Speak daily with $ j $" "Public health info from $ j $" "Close friend with $ j $" "Drank with $ j $"
frmttable using "netmulthypothfullmm50", statmat(D1)  sdec(3,3,3,3) ctitles("Outcome Variable", "Coefficient", "Std. Error", "P-value", "Westfall-Young")  hline(11000000001) tex frag replace

wyoung, cmd("reghdfe knowperson treattreat treatcontrol controltreat stddist $sumvars1 $diffvars1 if femalefemale==1, absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)" "reghdfe helpdecreasingalc treattreat treatcontrol controltreat stddist familyext knownatleast10yrs spouse $sumvars1 $diffvars1 if femalefemale==1, absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)" "reghdfe advice treattreat treatcontrol controltreat stddist familyext knownatleast10yrs spouse $sumvars1 $diffvars1 if femalefemale==1, absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)" "reghdfe trust treattreat treatcontrol controltreat stddist familyext knownatleast10yrs spouse $sumvars1 $diffvars1 if femalefemale==1, absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)" "reghdfe workedwith treattreat treatcontrol controltreat stddist familyext knownatleast10yrs spouse $sumvars1 $diffvars1 if femalefemale==1, absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)" "reghdfe speakdaily treattreat treatcontrol controltreat stddist familyext knownatleast10yrs spouse $sumvars1 $diffvars1 if femalefemale==1, absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)" "reghdfe infopublichealth treattreat treatcontrol controltreat stddist familyext knownatleast10yrs spouse $sumvars1 $diffvars1 if femalefemale==1, absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)" "reghdfe closefriend treattreat treatcontrol controltreat stddist familyext knownatleast10yrs spouse $sumvars1 $diffvars1 if femalefemale==1, absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)" "reghdfe drankwith treattreat treatcontrol controltreat stddist familyext knownatleast10yrs spouse $sumvars1 $diffvars1 if femalefemale==1, absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)") familyp(treattreat) cluster(indvid) bootstraps(100) seed(111)

matrix E=r(table)
matrix E1=E[1...,1..4]
matrix rownames E1="Know $ j $" "Help decreasing alcohol $ j $" "Agricultural info from $ j $" "Trust $ j $" "Worked with $ j $" "Speak daily with $ j $" "Public health info from $ j $" "Close friend with $ j $" "Drank with $ j $"
frmttable using "netmulthypothfullff", statmat(E1)  sdec(3,3,3,3) ctitles("Outcome Variable", "Coefficient", "Std. Error", "P-value", "Westfall-Young")  hline(11000000001) tex frag replace

wyoung, cmd("reghdfe knowperson treattreat treatcontrol controltreat stddist $sumvars1 $diffvars1 if femalefemale==1&distance50bi==1, absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)" "reghdfe helpdecreasingalc treattreat treatcontrol controltreat stddist familyext knownatleast10yrs spouse $sumvars1 $diffvars1 if femalefemale==1&distance50bi==1, absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)" "reghdfe advice treattreat treatcontrol controltreat stddist familyext knownatleast10yrs spouse $sumvars1 $diffvars1 if femalefemale==1&distance50bi==1, absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)" "reghdfe trust treattreat treatcontrol controltreat stddist familyext knownatleast10yrs spouse $sumvars1 $diffvars1 if femalefemale==1&distance50bi==1, absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)" "reghdfe workedwith treattreat treatcontrol controltreat stddist familyext knownatleast10yrs spouse $sumvars1 $diffvars1 if femalefemale==1&distance50bi==1, absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)" "reghdfe speakdaily treattreat treatcontrol controltreat stddist familyext knownatleast10yrs spouse $sumvars1 $diffvars1 if femalefemale==1&distance50bi==1, absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)" "reghdfe infopublichealth treattreat treatcontrol controltreat stddist familyext knownatleast10yrs spouse $sumvars1 $diffvars1 if femalefemale==1&distance50bi==1, absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)" "reghdfe closefriend treattreat treatcontrol controltreat stddist familyext knownatleast10yrs spouse $sumvars1 $diffvars1 if femalefemale==1&distance50bi==1, absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)" "reghdfe drankwith treattreat treatcontrol controltreat stddist familyext knownatleast10yrs spouse $sumvars1 $diffvars1 if femalefemale==1&distance50bi==1, absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)") familyp(treattreat) cluster(indvid) bootstraps(100) seed(111)

matrix F=r(table)
matrix F1=F[1...,1..4]
matrix rownames F1="Know $ j $" "Help decreasing alcohol $ j $" "Agricultural info from $ j $" "Trust $ j $" "Worked with $ j $" "Speak daily with $ j $" "Public health info from $ j $" "Close friend with $ j $" "Drank with $ j $"
frmttable using "netmulthypothfullff50", statmat(F1)  sdec(3,3,3,3) ctitles("Outcome Variable", "Coefficient", "Std. Error", "P-value", "Westfall-Young")  hline(11000000001) tex frag replace

wyoung, cmd("reghdfe knowperson treattreat treatcontrol controltreat stddist $sumvars1 $diffvars1 if mixedgender==1, absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)" "reghdfe helpdecreasingalc treattreat treatcontrol controltreat stddist familyext knownatleast10yrs spouse $sumvars1 $diffvars1 if mixedgender==1, absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)" "reghdfe advice treattreat treatcontrol controltreat stddist familyext knownatleast10yrs spouse $sumvars1 $diffvars1 if mixedgender==1, absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)" "reghdfe trust treattreat treatcontrol controltreat stddist familyext knownatleast10yrs spouse $sumvars1 $diffvars1 if mixedgender==1, absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)" "reghdfe workedwith treattreat treatcontrol controltreat stddist familyext knownatleast10yrs spouse $sumvars1 $diffvars1 if mixedgender==1, absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)" "reghdfe speakdaily treattreat treatcontrol controltreat stddist familyext knownatleast10yrs spouse $sumvars1 $diffvars1 if mixedgender==1, absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)" "reghdfe infopublichealth treattreat treatcontrol controltreat stddist familyext knownatleast10yrs spouse $sumvars1 $diffvars1 if mixedgender==1, absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)" "reghdfe closefriend treattreat treatcontrol controltreat stddist familyext knownatleast10yrs spouse $sumvars1 $diffvars1 if mixedgender==1, absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)" "reghdfe drankwith treattreat treatcontrol controltreat stddist familyext knownatleast10yrs spouse $sumvars1 $diffvars1 if mixedgender==1, absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)") familyp(treattreat) cluster(indvid) bootstraps(100) seed(111)

matrix G=r(table)
matrix G1=G[1...,1..4]
matrix rownames G1="Know $ j $" "Help decreasing alcohol $ j $" "Agricultural info from $ j $" "Trust $ j $" "Worked with $ j $" "Speak daily with $ j $" "Public health info from $ j $" "Close friend with $ j $" "Drank with $ j $"
frmttable using "netmulthypothfullmg", statmat(G1)  sdec(3,3,3,3) ctitles("Outcome Variable", "Coefficient", "Std. Error", "P-value", "Westfall-Young")  hline(11000000001) tex frag replace

wyoung, cmd("reghdfe knowperson treattreat treatcontrol controltreat stddist $sumvars1 $diffvars1 if mixedgender==1&distance50bi==1, absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)" "reghdfe helpdecreasingalc treattreat treatcontrol controltreat stddist familyext knownatleast10yrs spouse $sumvars1 $diffvars1 if mixedgender==1&distance50bi==1, absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)" "reghdfe advice treattreat treatcontrol controltreat stddist familyext knownatleast10yrs spouse $sumvars1 $diffvars1 if mixedgender==1&distance50bi==1, absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)" "reghdfe trust treattreat treatcontrol controltreat stddist familyext knownatleast10yrs spouse $sumvars1 $diffvars1 if mixedgender==1&distance50bi==1, absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)" "reghdfe workedwith treattreat treatcontrol controltreat stddist familyext knownatleast10yrs spouse $sumvars1 $diffvars1 if mixedgender==1&distance50bi==1, absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)" "reghdfe speakdaily treattreat treatcontrol controltreat stddist familyext knownatleast10yrs spouse $sumvars1 $diffvars1 if mixedgender==1&distance50bi==1, absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)" "reghdfe infopublichealth treattreat treatcontrol controltreat stddist familyext knownatleast10yrs spouse $sumvars1 $diffvars1 if mixedgender==1&distance50bi==1, absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)" "reghdfe closefriend treattreat treatcontrol controltreat stddist familyext knownatleast10yrs spouse $sumvars1 $diffvars1 if mixedgender==1&distance50bi==1, absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)" "reghdfe drankwith treattreat treatcontrol controltreat stddist familyext knownatleast10yrs spouse $sumvars1 $diffvars1 if mixedgender==1&distance50bi==1, absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)") familyp(treattreat) cluster(indvid) bootstraps(100) seed(111)

matrix H=r(table)
matrix H1=H[1...,1..4]
matrix rownames H1="Know $ j $" "Help decreasing alcohol $ j $" "Agricultural info from $ j $" "Trust $ j $" "Worked with $ j $" "Speak daily with $ j $" "Public health info from $ j $" "Close friend with $ j $" "Drank with $ j $"
frmttable using "netmulthypothfullmg50", statmat(H1)  sdec(3,3,3,3) ctitles("Outcome Variable", "Coefficient", "Std. Error", "P-value", "Westfall-Young")  hline(11000000001) tex frag replace

wyoung, cmd("reghdfe knowperson treattreat treatcontrol controltreat stddist $sumvars1 $diffvars1 if samegender==1, absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)" "reghdfe helpdecreasingalc treattreat treatcontrol controltreat stddist familyext knownatleast10yrs spouse $sumvars1 $diffvars1 if samegender==1, absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)" "reghdfe advice treattreat treatcontrol controltreat stddist familyext knownatleast10yrs spouse $sumvars1 $diffvars1 if samegender==1, absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)" "reghdfe trust treattreat treatcontrol controltreat stddist familyext knownatleast10yrs spouse $sumvars1 $diffvars1 if samegender==1, absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)" "reghdfe workedwith treattreat treatcontrol controltreat stddist familyext knownatleast10yrs spouse $sumvars1 $diffvars1 if samegender==1, absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)" "reghdfe speakdaily treattreat treatcontrol controltreat stddist familyext knownatleast10yrs spouse $sumvars1 $diffvars1 if samegender==1, absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)" "reghdfe infopublichealth treattreat treatcontrol controltreat stddist familyext knownatleast10yrs spouse $sumvars1 $diffvars1 if samegender==1, absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)" "reghdfe closefriend treattreat treatcontrol controltreat stddist familyext knownatleast10yrs spouse $sumvars1 $diffvars1 if samegender==1, absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)" "reghdfe drankwith treattreat treatcontrol controltreat stddist familyext knownatleast10yrs spouse $sumvars1 $diffvars1 if samegender==1, absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)") familyp(treattreat) cluster(indvid) bootstraps(100) seed(111)

matrix I=r(table)
matrix I1=I[1...,1..4]
matrix rownames I1="Know $ j $" "Help decreasing alcohol $ j $" "Agricultural info from $ j $" "Trust $ j $" "Worked with $ j $" "Speak daily with $ j $" "Public health info from $ j $" "Close friend with $ j $" "Drank with $ j $"
frmttable using "netmulthypothfullsg", statmat(I1)  sdec(3,3,3,3) ctitles("Outcome Variable", "Coefficient", "Std. Error", "P-value", "Westfall-Young")  hline(11000000001) tex frag replace

wyoung, cmd("reghdfe knowperson treattreat treatcontrol controltreat stddist $sumvars1 $diffvars1 if samegender==1&distance50bi==1, absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)" "reghdfe helpdecreasingalc treattreat treatcontrol controltreat stddist familyext knownatleast10yrs spouse $sumvars1 $diffvars1 if samegender==1&distance50bi==1, absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)" "reghdfe advice treattreat treatcontrol controltreat stddist familyext knownatleast10yrs spouse $sumvars1 $diffvars1 if samegender==1&distance50bi==1, absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)" "reghdfe trust treattreat treatcontrol controltreat stddist familyext knownatleast10yrs spouse $sumvars1 $diffvars1 if samegender==1&distance50bi==1, absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)" "reghdfe workedwith treattreat treatcontrol controltreat stddist familyext knownatleast10yrs spouse $sumvars1 $diffvars1 if samegender==1&distance50bi==1, absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)" "reghdfe speakdaily treattreat treatcontrol controltreat stddist familyext knownatleast10yrs spouse $sumvars1 $diffvars1 if samegender==1&distance50bi==1, absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)" "reghdfe infopublichealth treattreat treatcontrol controltreat stddist familyext knownatleast10yrs spouse $sumvars1 $diffvars1 if samegender==1&distance50bi==1, absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)" "reghdfe closefriend treattreat treatcontrol controltreat stddist familyext knownatleast10yrs spouse $sumvars1 $diffvars1 if samegender==1&distance50bi==1, absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)" "reghdfe drankwith treattreat treatcontrol controltreat stddist familyext knownatleast10yrs spouse $sumvars1 $diffvars1 if samegender==1&distance50bi==1, absorb($villagenumber enumeratormale1_1 enumeratormale1_2 enumeratormale2_1 enumeratorfemale1_1 enumeratorfemale1_2 enumeratorfemale2_1) cluster(indvid indvidmch)") familyp(treattreat) cluster(indvid) bootstraps(100) seed(111)

matrix J=r(table)
matrix J1=J[1...,1..4]
matrix rownames J1="Know $ j $" "Help decreasing alcohol $ j $" "Agricultural info from $ j $" "Trust $ j $" "Worked with $ j $" "Speak daily with $ j $" "Public health info from $ j $" "Close friend with $ j $" "Drank with $ j $"
frmttable using "netmulthypothfullsg50", statmat(J1)  sdec(3,3,3,3) ctitles("Outcome Variable", "Coefficient", "Std. Error", "P-value", "Westfall-Young")  hline(11000000001) tex frag replace

